package com.akorena.app.bridge;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import ymsg.network.event.SessionAuthorizationEvent;
import ymsg.network.event.SessionChatEvent;
import ymsg.network.event.SessionConferenceEvent;
import ymsg.network.event.SessionErrorEvent;
import ymsg.network.event.SessionEvent;
import ymsg.network.event.SessionExceptionEvent;
import ymsg.network.event.SessionFileTransferEvent;
import ymsg.network.event.SessionFriendEvent;
import ymsg.network.event.SessionListener;
import ymsg.network.event.SessionNewMailEvent;
import ymsg.network.event.SessionNotifyEvent;
import ymsg.network.event.SessionPictureEvent;

public class YahooSessionListener implements SessionListener {
	private static final Log log = LogFactory.getLog(YahooSessionListener.class);

	private YahooInterface yahooClientInterface;

	public YahooSessionListener(YahooInterface yahooClientIncoming) {
		this.yahooClientInterface = yahooClientIncoming;
	}

	public void buzzReceived(SessionEvent ev) {
	}

	public void chatConnectionClosed(SessionEvent ev) {
	}

	public void chatLogoffReceived(SessionChatEvent ev) {
	}

	public void chatLogonReceived(SessionChatEvent ev) {
	}

	public void chatMessageReceived(SessionChatEvent ev) {
	}

	public void chatUserUpdateReceived(SessionChatEvent ev) {
	}

	public void conferenceInviteReceived(SessionConferenceEvent ev) {

	}

	public void conferenceLogoffReceived(SessionConferenceEvent ev) {
	}

	public void conferenceLogonReceived(SessionConferenceEvent ev) {

	}

	public void conferenceMessageReceived(SessionConferenceEvent ev) {
	}

	public void connectionClosed(SessionEvent ev) {
		log.info("Connection closed");
		yahooClientInterface.connectionClosed();
	}

	public void contactRejectionReceived(SessionEvent ev) {
	}

	public void contactRequestReceived(SessionEvent ev) {
		log.info("Contact request received");
		yahooClientInterface.contactRequestReceived(ev.getFrom());
	}

	public void errorMessageReceived(SessionErrorEvent ev) {
		log.info("Error Message Received");
	}

	public void fileTransferReceived(SessionFileTransferEvent ev) {
	}

	public void friendAddedReceived(SessionFriendEvent ev) {
	}

	public void friendRemovedReceived(SessionFriendEvent ev) {
	}

	public void friendsUpdateReceived(SessionFriendEvent ev) {
	}

	public void inputExceptionThrown(SessionExceptionEvent ev) {
	}

	public void listReceived(SessionEvent ev) {
	}

	public void messageReceived(SessionEvent ev) {
		yahooClientInterface.messageReceived(ev);
	}

	public void newMailReceived(SessionNewMailEvent ev) {
	}

	public void notifyReceived(SessionNotifyEvent ev) {
	}

	public void offlineMessageReceived(SessionEvent ev) {

	}

	public void errorPacketReceived(SessionErrorEvent sev) {
		log.info("Error Packet Received");
	}

	public void conferenceInviteDeclinedReceived(SessionConferenceEvent arg0) {
		// TODO Auto-generated method stub

	}

	public void chatCaptchaReceived(SessionChatEvent arg0) {
		// TODO Auto-generated method stub

	}

	public void authorizationReceived(SessionAuthorizationEvent ev) {
		yahooClientInterface.authorizationReceived(ev);
		
	}

	
	public void pictureReceived(SessionPictureEvent arg0) {
		// TODO Auto-generated method stub
		
	}

}
